<?php
/**
 * Created by PhpStorm.
 * User: chenshiqi
 * Date: 2018/9/11
 * Time: 17:28
 */

namespace app\common\model;

use think\Model;

/**
 * 用户群组模型类
 */
class Common extends Model
{
    /**
     * 编辑信息
     * @param $params
     * @param $id
     * @return bool
     */
    public function _edit($params,$where){
        $result = $this->isUpdate(true)->allowField(true)->save($params,$where);
        if($result){
            return true;
        }else{
            return false;
        }
    }

    /**
     * 保存信息
     * @param $params
     * @return bool
     */
    public function _save($params){
        $result = $this->allowField(true)->save($params);
        if($result){
            return $this->id;
        }else{
            return false;
        }
    }
}